package com.alibaba.boot.dubbo.demo.provider.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.boot.dubbo.demo.consumer.UserService;
import com.alibaba.boot.dubbo.demo.model.User;
import com.alibaba.boot.dubbo.demo.provider.mapper.UserMapper;
import com.alibaba.dubbo.config.annotation.Service;

@Service(
        version = "${demo.service.version}",
        application = "${dubbo.application.id}",
        protocol = "${dubbo.protocol.id}",
        registry = "${dubbo.registry.id}"
)
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> findAllUsers() {
        return userMapper.selectAllUsers();
    }
}
